package com.accompany.utils;

public class BankCardUtils {


    /**
     * desc: 处理银行卡号格式
     * @param bankCard
     * @return {@link String}
     */
    public static String handleBankCardNum(String bankCard) {
        char[] bankArray = bankCard.toCharArray();
        String bankString = "";
        for (int i = 0; i < bankArray.length; i++) {
            if (i % 4 == 0 && i > 0) {
                bankString += " ";
            }
            bankString += bankArray[i];
        }

        return bankString;
    }
}
